package com.zzs.team.DAO;

import com.zzs.team.Entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface UserDao {

    @Select("select * from user where openID = #{openid}")
    public User findUserByOpenid(String openid);

    @Insert("insert into user values(#{openID},#{nickName},#{avatar})")
    public void insertUser(User user);

    @Update("update  user set nickName = #{name}")
    public void updateUserByNickName(String name);

    @Update("update  user set avatar = #{url}")
    public void updateUserByAvatarUrl(String url);

}
